package com.jk.controller;

import com.jk.entity.RecordInvesEntity;
import com.jk.service.RecordInvesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author 位佳生
 * @title: RecordInvesController
 * @projectName springboot_financial
 * @description: TODO
 * @date 2022/11/911:35
 */
@RestController
@RequestMapping("recordinves")
public class RecordInvesController {
    @Autowired
    private RecordInvesService recordInvesService;
    /*查询当前用户投资的所有项目*/
    @RequestMapping("getRecordInvesList")
    public List<RecordInvesEntity>  getRecordInvesList(RecordInvesEntity recordInvesEntity){
        return recordInvesService.getRecordInvesList(recordInvesEntity);
    }
    /*查询所有投资本项目的用户*/
    @RequestMapping("getRecordInvesByIdList")
    public List<RecordInvesEntity> getRecordInvesByIdList(Integer propertyId){
        return recordInvesService.getRecordInvesByIdList(propertyId);
    }

    /*
     * @description:  查询所有的投资记录
     * @author: 纪思齐
     * @date: 2022/11/14 15:28
     * @param: []
     * @return: java.util.Map
     **/
    @RequestMapping("findRecordList")
    public Map findRecordList(){
        return  recordInvesService.findRecordList();
    }

}
